package com.hpeng.sys.model;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;


@Entity
@Table(name = "STAFF")
public class Staff implements java.io.Serializable {
	private static final long serialVersionUID = 1L;
	private String staid;
	private Department department;
	private String staname;
	private String stasex;
	private String stacard;
	private Timestamp stabirth;
	private String stanative;
	private String stanation;
	private String statel;
	private String staaddress;
	private String stanote;
	private Short stasort;
	private String staposition;
	private String jbr;
	private String fzr;
	public Staff() {
	}

	
	@Id
	@GeneratedValue(generator = "generator")
	@GenericGenerator(name="generator",strategy="assigned")  //主键生成策略  用户自定义id
	@Column(name = "STAID", unique = true, nullable = false, length = 100)
	public String getStaid() {
		return this.staid;
	}

	public void setStaid(String staid) {
		this.staid = staid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "DEPID")
	public Department getDepartment() {
		return this.department;
	}

	public void setDepartment(Department department) {
		this.department = department;
	}

	@Column(name = "STANAME", length = 30)
	public String getStaname() {
		return this.staname;
	}

	public void setStaname(String staname) {
		this.staname = staname;
	}

	@Column(name = "STASEX", length = 10)
	public String getStasex() {
		return this.stasex;
	}

	public void setStasex(String stasex) {
		this.stasex = stasex;
	}

	@Column(name = "STACARD", length = 20)
	public String getStacard() {
		return this.stacard;
	}

	public void setStacard(String stacard) {
		this.stacard = stacard;
	}

	@Column(name = "STABIRTH", length = 7)
	public Timestamp getStabirth() {
		return this.stabirth;
	}

	public void setStabirth(Timestamp stabirth) {
		this.stabirth = stabirth;
	}

	@Column(name = "STANATIVE", length = 30)
	public String getStanative() {
		return this.stanative;
	}

	public void setStanative(String stanative) {
		this.stanative = stanative;
	}

	@Column(name = "STANATION", length = 20)
	public String getStanation() {
		return this.stanation;
	}

	public void setStanation(String stanation) {
		this.stanation = stanation;
	}

	@Column(name = "STATEL", length = 20)
	public String getStatel() {
		return this.statel;
	}

	public void setStatel(String statel) {
		this.statel = statel;
	}

	@Column(name = "STAADDRESS", length = 50)
	public String getStaaddress() {
		return this.staaddress;
	}

	public void setStaaddress(String staaddress) {
		this.staaddress = staaddress;
	}

	@Column(name = "STANOTE", length = 200)
	public String getStanote() {
		return this.stanote;
	}

	public void setStanote(String stanote) {
		this.stanote = stanote;
	}

	@Column(name = "STASORT", precision = 3, scale = 0)
	public Short getStasort() {
		return this.stasort;
	}

	public void setStasort(Short stasort) {
		this.stasort = stasort;
	}

	@Column(name = "STAPOSITION", length = 200)
	public String getStaposition() {
		return this.staposition;
	}

	public void setStaposition(String staposition) {
		this.staposition = staposition;
	}

	@Column(name = "JBR", length = 1)
	public String getJbr() {
		return jbr;
	}


	public void setJbr(String jbr) {
		this.jbr = jbr;
	}

	@Column(name = "FZR", length = 1)
	public String getFzr() {
		return fzr;
	}


	public void setFzr(String fzr) {
		this.fzr = fzr;
	}


}